#define _CRT_SECURE_NO_WARNINGS
#include"tree.h"
#include"queue.h"
void binary_tree_test1()
{
	BTnode* A = (BTnode*)malloc(sizeof(BTnode));
	A->data = 'A';
	A->left = NULL;
	A->right = NULL;
	BTnode* B = (BTnode*)malloc(sizeof(BTnode));
	B->data = 'B';
	B->left = NULL;
	B->right = NULL;
	BTnode* C = (BTnode*)malloc(sizeof(BTnode));
	C->data = 'C';
	C->left = NULL;
	C->right = NULL;
	BTnode* D = (BTnode*)malloc(sizeof(BTnode));
	D->data = 'D';
	D->left = NULL;
	D->right = NULL;
	BTnode* E = (BTnode*)malloc(sizeof(BTnode));
	E->data = 'E';
	E->left = NULL;
	E->right = NULL;
	BTnode* F = (BTnode*)malloc(sizeof(BTnode));
	F->data = 'F';
	F->left = NULL;
	F->right = NULL;

	A->left = B;
	A->right = C;
	B->left = D;
	B->right = E;
	D->left = F;
	post_order(A);
	printf("\n");
	printf("%d\n", tree_leaf_size(A));
	level_order(A);
	level_order(F->left);
	destory_tree(&A);
	post_order(A);

}
int main()
{
	binary_tree_test1();
	return 0;
}